package com.dididoctor.doctor.Activity.Usercentre.MyPurse.InComeList;

import android.content.Context;
import android.widget.TextView;

import com.dididoctor.doctor.MV.adapter.CommonAdapter;
import com.dididoctor.doctor.MV.adapter.ViewHolder;
import com.dididoctor.doctor.R;

import java.util.List;

/**
 * @version 2.0
 * @类描述：
 * @项目名称：ddgh
 * @类名称： OrderAdapter
 * @包名称： com.dididoctor.doctor.Activity.Order
 * @创建人： zhanjunjie
 * @创建时间：2016/4/20 18:43
 * @修改人：
 * @修改时间：2016/4/20 18:43
 * @修改备注： new parent class(用一句话描述修改了什么)
 */
public class ComeInAdapter extends CommonAdapter<ComeInBean> {

    private TextView mTvIncomeName, mTvIncomeType, mTvIncomeMoney, mTvIncodeData;
    private List<ComeInBean> datas;

    public ComeInAdapter(Context context, List<ComeInBean> datas) {
        super(context, datas, R.layout.item_income);
        this.context = context;
        this.datas = datas;
    }

    @Override
    public void convert(int position, ViewHolder helper, final ComeInBean item) {
        //患者
        mTvIncomeName = helper.getView(R.id.tv_income_name);
        mTvIncomeName.setText(item.getClientName());
        //收入渠道
        mTvIncomeType = helper.getView(R.id.tv_income_type);
        mTvIncomeType.setText(item.getType());

        //收入金额
        mTvIncomeMoney = helper.getView(R.id.tv_income_money);
        mTvIncomeMoney.setText(item.getMoney());

        //到账日期
        mTvIncodeData = helper.getView(R.id.tv_incode_date);
        mTvIncodeData.setText(item.getPayDate());

    }
}
